<?php
/**
 * Created by JetBrains PhpStorm.
 * User: avnovoselov
 * Date: 21.10.12
 * Time: 12:57
 * To change this template use File | Settings | File Templates.
 */
class log
{
    public static function it(array $data = array())
    {
        $text  = date('H:i:s').' ';
        $data['text'] = !empty($data['text']) ? $text.$data['text'] : $text.'default event';
        $data['text'] .= "\r\n";

        file::write(array(
            'file'  => conf::$path.'log/'.date('Y_m_d').'_log.log',
            'text'  => $data['text']
        ));
        chmod(conf::$path.'log/'.date('Y_m_d').'_log.log', '0774');
    }
}
